* {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  box-sizing: border-box;
}

body {
  background-color: #eceff1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;

  --primaryColor: #01579b;
}

a,
a:visited {
  color: var(--primaryColor);
}

.app {
  background-color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  border-radius: 1rem;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 800px;
  justify-content: center;
  align-items: center;
}

h1 {
  color: var(--primaryColor);
  width: 100%;
  font-size: x-large;
  font-weight: normal;
  margin-bottom: 1.5rem;
}

h2 {
  color: var(--primaryColor);
  font-weight: normal;
}

.controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.controls button {
  background-color: var(--primaryColor);
  color: white;
  margin-top: 1rem;
  margin-bottom: 1rem;
  align-self: center;
  border: 0;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  height: 3rem;
}

.book-container {
  flex: 0.75;
}

label {
  display: flex;
  align-items: baseline;
  width: 100%;
  flex-wrap: wrap;
  min-height: 1.8rem;
  margin-bottom: 0.25rem;
}

label>span:first-child {
  min-width: 8rem;
  margin-bottom: 0.25rem;
  margin-top: 0.5rem;
}

label>span.inputs {
  flex: 1;
  display: flex;
  align-items: baseline;
  min-width: 15rem;
}

label input[type='color'] {
  align-self: center;
}

label input[type='range'] {
  flex: 1;
  align-self: center;
  color: red;
}

label input[type='number'] {
  flex: 0;
  min-width: 4rem;
  text-align: right;
}

label input[type='text'] {
  flex: 1;
}

label input.color-input {
  max-width: 5rem;
  margin-right: 0.25rem;
}

label input[type='text'],
label input[type='number'] {
  border: 1px solid lightgray;
  padding: 0.25rem;
}

label input[type='text']:focus,
label input[type='number']:focus {
  outline: 0;
  border-color: var(--primaryColor);
}

label .unit {
  width: 2rem;
  margin-left: 0.25rem;
}

.outputs {
  flex: 1;
  max-width: 100%;
}

.output style,
.output pre {
  border: 1px solid lightgray;
  display: block;
  white-space: pre;
  overflow-wrap: anywhere;
  font-family: Monaco, monospace;
  font-size: smaller;
  overflow: auto;
  max-height: 10rem;
}

footer {
  margin-top: 3rem;
}

input[type='range'] {
  height: 25px;
  -webkit-appearance: none;
  margin: 0 0;
  width: 100%;
}

input[type='range']:focus {
  outline: none;
}

input[type='range']::-webkit-slider-runnable-track {
  width: 100%;
  height: 5px;
  cursor: pointer;
  animate: 0.2s;
  box-shadow: 0px 0px 0px #000000;
  background: var(--primaryColor);
  border-radius: 1px;
  border: 0px solid #000000;
}

input[type='range']::-webkit-slider-thumb {
  box-shadow: 0px 0px 0px #000000;
  border: 1px solid var(--primaryColor);
  height: 18px;
  width: 18px;
  border-radius: 25px;
  background: var(--primaryColor);
  opacity: 0.8;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
}

input[type='range']:focus::-webkit-slider-runnable-track {
  background: var(--primaryColor);
}

input[type='range']::-moz-range-track {
  width: 100%;
  height: 5px;
  cursor: pointer;
  animate: 0.2s;
  box-shadow: 0px 0px 0px #000000;
  background: var(--primaryColor);
  border-radius: 1px;
  border: 0px solid #000000;
}

input[type='range']::-moz-range-thumb {
  box-shadow: 0px 0px 0px #000000;
  border: 1px solid var(--primaryColor);
  height: 18px;
  width: 18px;
  border-radius: 25px;
  background: var(--primaryColor);
  opacity: 0.8;
  cursor: pointer;
}

input[type='range']::-ms-track {
  width: 100%;
  height: 5px;
  cursor: pointer;
  animate: 0.2s;
  background: transparent;
  border-color: transparent;
  color: transparent;
}

input[type='range']::-ms-fill-lower {
  background: var(--primaryColor);
  border: 0px solid #000000;
  border-radius: 2px;
  box-shadow: 0px 0px 0px #000000;
}

input[type='range']::-ms-fill-upper {
  background: var(--primaryColor);
  border: 0px solid #000000;
  border-radius: 2px;
  box-shadow: 0px 0px 0px #000000;
}

input[type='range']::-ms-thumb {
  margin-top: 1px;
  box-shadow: 0px 0px 0px #000000;
  border: 1px solid var(--primaryColor);
  height: 18px;
  width: 18px;
  border-radius: 25px;
  background: var(--primaryColor);
  opacity: 0.8;
  cursor: pointer;
}

input[type='range']:focus::-ms-fill-lower {
  background: var(--primaryColor);
}

input[type='range']:focus::-ms-fill-upper {
  background: var(--primaryColor);
}

.self-promotion {
  background-color: #e3f2fd;
  padding: 0.75rem 1rem 1rem;
  width: 100%;
  text-align: center;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.threed-book-link {
  font-size: large;
}

.threed-book-link a {
  font-size: inherit;
}